Image processing method and device

ABSTRACT

In image processing method and device used in, for instance, wire bonding, the amount of positional deviation, which is of between a reference image and a rotated image which is obtained by rotating the reference image by a particular angle, is calculated by pattern matching between such two images, and then a first alignment point is determined based upon the calculated amount of the positional deviation and the rotational angle which is a known quantity. By way of using the first alignment point as a reference, pattern matching is executed between the reference image and an image of a comparative object (a semiconductor device, for instance) that is obtained by imaging the comparative object disposed in an attitude that includes positional deviations in the rotational direction, thus minimizing the error in the detected position of the comparative object.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image processing method and device,and more particularly to a method and device for calculating theposition of a comparative object by executing pattern matching betweenthis comparative object and a reference image.

2. Prior Art

Pattern matching that uses a portion of a reference image constituting aknown image as a template image in order to detect the position of acomparative object by detecting the position of this known imagecontained in an image of the comparative object is widely used in imageprocessing technology.

A position detection method utilizing this pattern matching will bedescribed using a wire bonding apparatus, which is a semiconductorassembly apparatus, as an example. In a wire bonding apparatus, wiresconsisting of a metal wires, etc., are bonded so that these wiresconnect bonding pads consisting of aluminum, etc., on the surface of asemiconductor chip and leads consisting of conductors formed so thatthese leads surround the semiconductor chip. Prior to this bondingoperation, the bonding points which are the points where bonding isperformed are calculated using pattern matching.

First, as shown in FIG. 18, alignment points which constitute referencepoints used for positional alignment are registered. In a wire bondingapparatus which has a structure that is as similar as in FIG. 1 in whicha camera 7 that is fastened to an XY table 1 is moved in the horizontaldirection relative to a semiconductor chip 14 a by the operation of thisXY table 1, such a registration is accomplished in the following manner:while an image from the camera 7 which has imaged the semiconductor chip14 is displayed on the display screen of a monitor 39, the visual fieldis moved by moving the XY table 1 to which the camera 7 is fastened, sothat the center point 32 a of cross marks 32 that indicate the center ofthe visual field displayed on the display screen of the monitor 39 isaligned with an arbitrary point on the semiconductor chip 14 a, and aninput operation is performed by pressing an input switch, etc., of amanual input means 33. An image of the region surrounded by arectangular reticle mark 42 centered on the center point 32 a in thiscase is stored in memory as a template image, and the coordinates on theXY table 1 in this case are stored in a data memory 36 as an alignmentpoint.

In regard to these alignment points, two locations (Pa1x, Pa1y) and(Pa2x, Pa2y) are generally selected for the pad side, and two locations(La1x, La1y) and (La2x, La2y) are generally selected for the lead side,from diagonal lines in the vicinity of the four corners of thesemiconductor chip 14 a in order to minimize the detection error.

Next, the coordinates of the respective bonding points are stored in thedata memory 36 by pressing the input switch, etc., while aligning thecenter point 32 a of the cross marks 32 with appropriate positions onthe individual pads P and leads L, generally the approximate centers ofthe pads P, and points that are located at the approximate centers ofthe leads L with respect to the direction of width and at a fixeddistance from the end of each lead L.

Then, as run time processing (i.e., processing at the time of productionof the product), a new semiconductor device 14 is installed as acomparative object, the XY table 1 is moved by the control of thecontrol section 34 so that the vicinity of the registered alignmentpoint A0 constitutes the visual field of the camera 7 (FIG. 19), and animage of the semiconductor device 14 is acquired by the camera 7.Further, by pattern matching detection using a registered referenceimage, the reference image is superimposed on the image of thecomparative object in relative positions which are such that the amountof coincidence between the image of the comparative object and thereference image shows a maximum value, and the amount of positionaldeviation (ΔX, ΔY) between the positional coordinates of the centerpoint 32 a in this attitude on the XY table 1 and the positionalcoordinates of the alignment point A0 on the XY table 1 (constitutingthe position of the center point 32 a at the time that the templateimage is previously registered), e.g., (Pa1x, Pa1y) is determined.

The positional deviation is likewise calculated for all of the alignmentpoints.

Then, the calculated amounts of positional deviation (ΔX, ΔY) are addedto the positional coordinates of the alignment points determined at thetime that the template image is previously registered, e.g., as(Pa1x+ΔX, Pa1y+ΔY), and the values thus obtained are taken as newalignment points Am.

Next, the actual bonding points are determined by calculating thepositions of the respective pads and leads (this will be referred tobelow as “position correction”) from the positions of the new alignmentpoints Am in such a manner that the relative positions of the respectivepads and leads with respect to the alignment points A0 at the time ofregistration are preserved. Then, a bonding operation is next performedon these actual bonding points.

In cases where the semiconductor device 14, which is a comparativeobject, is disposed in an attitude that includes positional deviation inthe rotational direction thereof, problems occur. Even if patternmatching detection using a registered reference image is performed,high-precision correction of the positions of the pads P and leads Lcannot be accomplished.

The reason for the problems is as follows: in principle, if the image ofthe comparative object and the reference image are superimposed so thatthe amount of coincidence shows a maximum value for the pattern servingas a reference (the pads P in FIG. 19), the position of the newalignment point Am stipulated by the relative position with respect tothe pattern serving as a reference should coincide with the position ofthe original alignment point A0 likewise stipulated by the relativeposition with the pads P in the reference image. However, as shown inFIG. 20, in a case where the semiconductor device 14, the comparativeobject, is disposed in an attitude that includes positional deviationthereof in the rotational direction, the original alignment point A0 andthe new alignment point Am do not coincide even if the image of thecomparative object and the reference image are superimposed so that theamount of coincidence shows a maximum value for the pattern serving as areference (the pads P in FIG. 20).

On the other hand, it is sufficient if a point that tends not to beaffected by the rotation of the attitude of the semiconductor device 14constituting the comparative object is set as the alignment point.However, it is difficult for the operator to find such an alignmentpoint. The error caused by this positional deviation of the comparativeobject in the rotational direction is not a problem if the pitch betweenthe pads P or pitch between the leads L is sufficiently large. Thiserror, however, has become a major problem in handling the reduction inpitch seen in recent years, i.e., the reduction in the pitch between thepads P and between the leads L.

Meanwhile, various methods have also been proposed in which patternmatching with the image of a comparative object is executed while thereference image is rotated (e.g., see Japanese Patent ApplicationLaid-Open (Kokai) No. H09-102039). In the case of such methods, positiondetection that takes into account positional deviation in the rotationaldirection of a semiconductor device is possible. However, patternmatching in several increments in the rotational direction of thesemiconductor device must be executed for numerous points in the visualfield, so that the amount of calculation required is extremely large,thus slowing the recognition speed so that such methods are notpractical.

SUMMARY OF THE INVENTION

Accordingly, the object of the present invention is to provide an imageprocessing method and device which makes it possible to realizehigh-precision position detection without performing pattern matching inthe rotational direction (which tends to require an extremely largeamount of calculation), even in cases where a comparative object isdisposed in an attitude that includes positional deviation in therotational direction of the comparative object which is, for instance, asemiconductor device.

The above object is accomplished by a unique process for an imageprocessing method of the present invention that comprises the steps of:

-   -   executing pattern matching between a rotated image and a        reference image, the rotated image being obtained by rotating        the reference image that is inputted beforehand;    -   specifying, based upon a result of the pattern matching, a        rotation-resistant reference point at which an error of position        of a comparative object becomes a minimum value, the error being        detected by pattern matching between an image of the comparative        object, which is obtained by imaging the comparative object        disposed in an attitude that includes a positional deviation in        a direction of rotation of the comparative object, and the        reference image; and    -   performing a positional alignment of the image of the        comparative object and the reference image using the        rotation-resistant reference point as a reference, thus        calculating a position of the comparative object.

In the above method, pattern matching is executed between a rotatedimage, which is obtained by rotating a reference image that is inputtedbeforehand, and the reference image. Next, a rotation-resistantreference point which is such that an error of the position of acomparative object disposed in an attitude including a positionaldeviation in the direction of rotation of the reference image (the errorbeing detected by pattern matching between an image of the comparativeobject obtained by imaging the comparative object and the referenceimage) shows a minimum value is specified based upon the results of thispattern matching. Then, the positions of the image of the comparativeobject and the reference image are aligned using the rotation-resistantreference point as a reference, and the position of the comparativeobject is calculated.

Thus, in the above method, since the rotation-resistant reference pointis determined by executing pattern matching between the rotated imageand the reference image beforehand, the detection error in the positionof the comparative object can be reduced when the positions of the imageof the comparative object and the reference image are aligned using thisrotation-resistant reference point as a reference. As a result, even incases where the comparative object is disposed in an attitude thatincludes positional deviation in the rotational direction,high-precision position detection can be performed without executingpattern matching in the rotational direction, which tends to require anextremely large amount of calculation.

The above object is accomplished by another unique process for an imageprocessing method of the present invention that comprises the steps of:

-   -   calculating an amount of positional deviation between a rotated        image and a reference image based upon pattern matching between        the rotated image and the reference image, the rotated image        being obtained by rotating the reference image that is inputted        beforehand;    -   specifying, based upon an angle of the rotation and the amount        of positional deviation, a rotation-resistant reference point at        which an error of position of a comparative object becomes a        minimum value, the error being detected by pattern matching        between an image of the comparative object, which is obtained by        imaging the comparative object disposed in an attitude that        includes a positional deviation in a direction of rotation of        the comparative object, and the reference image; and    -   performing a positional alignment of the image of the        comparative object and the reference image using the        rotation-resistant reference point as a reference, thus        calculating a position of the comparative object.

In the above method of the present invention, the amount of positionaldeviation between a rotated image, which is obtained by rotating areference image, and this reference image is calculated based uponpattern matching between such two images, and a rotation-resistantreference point is specified based upon the angle of the above-describedrotation and the above-described amount of positional deviation. Inother words, a rotation-resistant reference point can be specified usingthe amount of positional deviation obtained by pattern matching betweenthe rotated image and the reference image, and the angle of rotationwhich is a known quantity.

The above object is accomplished by still another unique process for animage processing method of the present invention that comprises thesteps of:

-   -   performing calculations of amount of coincidence between a        rotated image and a reference image for each of a plurality of        different centers of rotation within the reference image, the        rotated image being obtained by rotating the reference image        that is inputted beforehand;    -   specifying a center of rotation or a point in a region near the        center of rotation as a rotation-resistant reference point, the        center of rotation being within a specified range from a maximum        value of the amount of coincidence among the plurality of        different centers of rotation, and the rotation-resistant        reference point being at which an error of position of a        comparative object becomes a minimum value, the error being        detected by pattern matching between an image of the comparative        object, which is obtained by imaging the comparative object        disposed in an attitude that includes a positional deviation in        a direction of rotation of the comparative object, and the        reference image; and    -   performing a positional alignment of the image of the        comparative object and the reference image using the        rotation-resistant reference point as a reference, thus        calculating a position of the comparative object.

In the above method of the present invention, the amount of coincidencebetween a rotated image, which is obtained by rotating a referenceimage, and this reference image is respectively calculated for aplurality of different centers of rotation within the reference image,and a center of rotation (among the above-described plurality ofdifferent centers of rotation) at which the amount of coincidence iswithin a specified range from the maximum value, or a point in a regionnear this center of rotation, is specified as a rotation-resistantreference point. Accordingly, the influence of the positional deviationof the attitude of the comparative object in the rotational directioncan be reduced.

In any of the above methods, at least two of the rotation-resistantreference points are specified for a single comparative object; and twoof the rotation-resistant reference points are included in a singleimage frame upon performing the positional alignment.

Thus, at least two of the rotation-resistant reference points arespecified for a single comparative object, and the at least tworotation-resistant reference points are included in a single image framein the positional alignment of the comparative object and the referenceimage. Accordingly, in addition to the effects and advantages of thepresent invention as described above, image acquisition at the time ofpositional alignment needs to be performed only once, and the workingefficiency of the position detection process can be improved.

Furthermore, the image processing method of the present invention mayincludes a step of calculating working processing points in thecomparative object using the rotation-resistant reference points as areference.

In this method, the working processing points in the comparative objectare calculated using the rotation-resistant reference points as areference. Accordingly, as a result of the positions of therotation-resistant reference points being determined with a highprecision, the precision with which the positions of working processingpoints are detected can be increased also.

Furthermore, in the above method that includes the step of calculatingworking processing points: two of the rotation-resistant referencepoints are specified for a single comparative object; and workingprocessing points that are present outside a circle, which contacts thetwo rotation-resistant reference points and whose diameter is a straightline that connects the two rotation-resistant reference points, arecalculated.

In this method, the working processing points that are located outside aregion that is surround by two rotation-resistant reference points arecalculated for a single comparative object. Accordingly, compared to theconventional method in which the working processing points that arepresent inside a region surrounded by two alignment points arecalculated, the distance of the relative movement of the camera and thecomparative object during the imaging of the two rotation-resistantreference points can be further reduced. In addition, by way of allowingtwo rotation-resistant reference points to be included in a single imageframe, the distance of the relative movement of the camera and thecomparative object during the imaging of the two rotation-resistantreference points can be reduced to zero. Accordingly, the workingefficiency of the position detection process can be further improved.

The above object is also accomplished by a unique structure for an imageprocessing device of the present invention that comprises:

-   -   a trial processing means that executes pattern matching between        a rotated image and a reference image, the rotated image being        obtained by rotating the reference image that is inputted        beforehand;    -   a reference point calculating means that specifies, based upon a        result of the pattern matching, a rotation-resistant reference        point at which an error of position of a comparative object        becomes a minimum value, the error being detected by pattern        matching between an image of the comparative object, which is        obtained by imaging the comparative object disposed in an        attitude that includes a positional deviation in a direction of        rotation of the comparative object, and the reference image; and    -   a position detection means that performs a positional alignment        of the image of the comparative object and the reference image        using the rotation-resistant reference point as a reference,        thus calculating a position of the comparative object.

The above image processing device provides a substantially the sameeffect and advantages described with reference to the image processingmethod of the present invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a bonding apparatus in which the imageprocessing method and device of the present invention is used;

FIG. 2 is a flow chart of one example of the registration processing ofa new semiconductor device in the first embodiment of the presentinvention;

FIG. 3 is a flow chart of one example of the run time processing in thefirst embodiment of the present invention;

FIG. 4 is an explanatory diagram that illustrates the reference image inthe first embodiment of the present invention;

FIG. 5 is an explanatory diagram that illustrates the rotated image(forward direction) in the first embodiment of the present invention;

FIG. 6 is an explanatory diagram that illustrates the process of patternmatching for the rotated image (forward direction) in the firstembodiment of the present invention;

FIG. 7 is an explanatory diagram that illustrates the rotated image(reverse direction) in the first embodiment of the present invention;

FIG. 8 is an explanatory diagram that illustrates the process of patternmatching for the rotated image (reverse direction) in the firstembodiment of the present invention;

FIG. 9 is an explanatory diagram that illustrates the alignment pointcalculation method in the first embodiment of the present invention;

FIG. 10 is an explanatory diagram that illustrates the process ofpattern matching between the image of the comparative object and thereference image in the first embodiment of the present invention;

FIG. 11 is an explanatory diagram that illustrates the relationshipbetween the position of the camera at the time of acquisition of theimage of the comparative object and the effective region of thereference image in the first embodiment of the present invention;

FIG. 12 is an explanatory diagram that illustrates a modification of thefirst embodiment of the present invention;

FIG. 13 is a flow chart of one example of the registration processing ofa new semiconductor device according to the second embodiment of thepresent invention;

FIG. 14 is an explanatory diagram that illustrates the setting of thesampling points in the second embodiment;

FIG. 15 is an explanatory diagram that illustrates the setting of thesampling points in a modification of the second embodiment of thepresent invention;

FIG. 16 is a plan view of the semiconductor device used in the thirdembodiment of the present invention of the present invention;

FIG. 17 is a flow chart of one example of the registration processing ofa new semiconductor device according to the third embodiment of thepresent invention;

FIG. 18 is an explanatory diagram that illustrates the alignment pointsetting process in prior art;

FIG. 19 is an explanatory diagram that illustrates the process ofpattern matching between the image of the comparative object and thereference image in prior art; and

FIG. 20 is an explanatory diagram that shows the causes of positiondetection error in prior art.

DETAILED DESCRIPTION OF THE INVENTION First Embodiment

FIG. 1 shows a schematic structure of a wire bonder structured accordingto one embodiment of the present invention.

In FIG. 1, a bonding arm 3 is disposed on a bonding head 2 which ismounted on an XY table 1, and a tool 4 is attached to the tip end of thebonding arm 3. The bonding arm 3 is driven in the vertical direction bya Z-axis motor (not shown). A damper 5 which holds a wire W is disposedabove the bonding arm 3. The lower end of the wire W is passed throughthe tool 4. The tool 4 in this embodiment is a capillary.

A camera arm 6 is fastened to the bonding head 2, and a camera 7 isfastened to the camera arm 6. The camera 7 images a semiconductor device14 on which a semiconductor chip 14 a, etc., is mounted. The XY table 1is structured so as to be accurately moved in the X and Y directions,which are the directions of the mutually perpendicular coordinate axesin the horizontal plane, by means of XY table motors (not shown). The XYtable motors are, for instance, two pulse motors that are installed inthe vicinity of the XY table 1. The structure described so far is aknown in the prior art.

The XY table 1 is driven via a motor driving section 30 and the XY tablemotors by commands from a control section 34 which is, for instance, amicroprocessor. The image acquired by the camera 7 is converted to imagedata that is an electrical signal; and this image data is processed byan image processing section 38 and inputted into a calculationprocessing section 37 via the control section 34. In the calculationprocessing section 37, various types of calculations includingcalculations involved in position detection (described later) areperformed, and programs and data used for such calculations aretemporarily held in a control memory 35. A manual input means 33 and amonitor 39 are connected to the control section 34. The manual inputmeans 33 preferably is at least a pointing device such as a mouse inputdevice equipped with a direction indicating function for the X and Ydirections and a set signal input function using an input button.Keyboards equipped with a character input function can be also used asthe manual input means 33.

The monitor 39 is a CRT (cathode ray tube), liquid crystal displaydevice, etc. Images acquired by the camera 7, associated numericalvalues such as coordinate values and magnifications, etc., and varioustypes of character messages (described later), etc., are displayed onthe display screen of the monitor 39 based upon the output of thecontrol section 34. In the position detection process as shown in FIG.4, cross marks 32 which indicate the center of the visual field, and arectangular reticle mark 42 which is displayed and stored in memory as amark that indicates a region within the visual field that surrounds thecross marks 32, are displayed on the display screen. The intersectionpoint of the vertical line and horizontal line in the cross marks 32 isthe center point 32 a.

The data memory 36 is a known memory, hard disk drive, etc. that allowsthe reading and writing of data. A data library 36 a is accommodated inthe storage region of the data memory 36. Template images (describedlater), past values such as correlation values, etc., default valueswhich are the initial states of these values, and various types ofsetting values used in other operations of the present device, arestored in this data library 36 a. Various types of setting values arestored (as will be described later) by signals from the control section34.

In the first embodiment, the registration of alignment points and theregistration of the respective bonding points are first performed asregistration processing for a new semiconductor device 14. Then,position detection that uses pattern matching is performed as processingin the run time.

FIG. 2 is a flow chart that illustrates the registration processing fora new semiconductor device 14.

First, the XY table 1 is driven by the output of the control section 34,and the camera 7 is moved to the vicinity of a point that is to be thefirst alignment point (S102). Then, as shown in FIG. 4, the position ofthe center point 32 a of the cross marks 32 in the moved attitude isstored in the data memory 36 by the output of the control section 34 asthe coordinates (Xp1, Yp1) of the reference imaging point (S104).Furthermore, a semiconductor device 14 is imaged by the camera 7 in thisposition. The image data of the semiconductor device 14 that isconverted into an electrical signal is processed by the image processingsection 38 and stored in the data library 36 a of the data memory 36 asa reference image (S106). Within the reference image, the regionsurrounded by the reticle mark 42 is used as a template image in theposition detection process (described later). The image in an uprightattitude indicated by the solid lines in FIG. 4 and by dotted lines inFIGS. 5 through 8 corresponds to the reference image. The referenceimaging point (Xp1, Yp1) which is the position of the center point 32 acorresponds to the alignment point prior to improvement by the presentinvention.

Next, in the calculation processing section 37, processing which rotatesthe reference image by +Q° (degrees) is performed (S108). This rotationis performed, for instance, about a point O located at the lower leftcorner of the reticle mark 42 in FIG. 5. The image obtained as a resultof such rotation processing will be referred to below as a “rotatedimage”. The image with an inclined attitude drawn by solid lines inFIGS. 5 and 6 and in FIGS. 7 and 8 (described later) is the rotatedimage.

Next, a pattern matching processing between the rotated image andreference image is executed. In other words, a search is made, using anormalized correlation operation (S110), for the point of maximumcoincidence with the reference image in the rotated image. Morespecifically, correlation values R between the rotated image and thereference image calculated by the following Numerical Expression 1 arecalculated for the respective pixels within the region of the rotatedimage or for respective reference points disposed in a scattered mannerwithin the region of the rotated image; then, a search is made for apoint where the correlation value R shows a maximum value, and thispoint is taken as the above-described point of maximum coincidence.$\begin{matrix}\begin{matrix}{{R = \frac{\left\{ {{N\quad\Sigma\quad{IM}} - \left\{ {\Sigma\quad I\quad\Sigma\quad M} \right\}} \right\}}{\sqrt{\left\{ {{N\quad\Sigma\quad I^{2}} - \left\{ {\Sigma\quad I} \right\}^{2}} \right\}\left\{ {{N\quad\Sigma\quad M^{2}} - \left\{ {\Sigma\quad M} \right\}^{2}} \right\}}}}\quad} \\{{{{Range}\quad{of}\quad R\text{:}}\quad - 1} \leq R \leq 1}\end{matrix} & {{Numerical}\quad{Expression}\quad 1}\end{matrix}$

Here, R is the correlation value, N is the number of pixels in therotated image, I is the brightness value at respective positions withinthe rotated image, and M is the brightness value of the rotated image.

The coordinates (X1, Y1) of the point of maximum coincidence thusdetermined are stored in the data memory 36 (S112, FIG. 6).

Next, in the calculation processing section 37, processing is performedin which the reference image is rotated by −Q° (degrees) (S114, FIG. 7).As in the case of step S108, this rotation is performed about the pointO located at the lower left corner of the reticle mark 42.

Then, as a pattern matching processing between the rotated image andreference image, with the use of the normalized correlation operation ofthe Numerical Expression 1, a search is made for the point of maximumcoincidence with the reference image in the rotated image (S116). Inconcrete terms, correlation values R between the rotated image and thereference image calculated by the Numerical Expression 1 are calculatedfor the respective pixels within the region of the rotated image or forrespective reference points disposed in a scattered manner within theregion of the rotated image; then, a search is made for a point wherethe correlation value R shows a maximum value, and this point is takenas the above-described point of maximum coincidence.

The coordinates (X2, Y2) of the point of maximum coincidence thusdetermined are stored in the data memory 36 (S118, FIG. 8).

Furthermore, the first alignment point that is used as arotation-resistant reference point in the present invention isdetermined. This is done using the coordinates (X1, Y1) and (X2, Y2) ofthe points of maximum coincidence thus determined and Q (degrees) whichis a known rotational angle (S120). The calculation for determining thefirst alignment is performed in approximate terms using the NumericalExpressions 2 and 3 shown below. The first alignment point can becalculated based upon a polar coordinate system expressed using theradius r and angle α, with the point O used as a reference.α=tan⁻¹{(X 2−X 1)/(Y 1−Y 2)}  Numerical Expression 2r=√{(X 2−X 1)²+(Y 2 −Y 1)²}/2 sin Q  Numerical Expression 3

As seen from FIG. 9, Numerical Expression 2 utilizes the fact that theangle ∠O·A1·Am1 in FIG. 9 can be approximated by the right angles incases where the angle Q is very small. Assuming that a perpendicular legdropped to the X axis (which is the bottom side of the reticle mark 42indicated by a dotted line in FIG. 9) from A1 is point B, and that∠Am1·A1·B is θ, then, from the above-described approximation,(∠O·A1·B)≈90−θ is obtained. Meanwhile, since ∠A1·B·O is the rightangles, the angle α of ∠A1·O·B can be approximated as α≈θ. On the otherhand, the angle θ is determined as θ=tan⁻¹(X1/Y1). Accordingly,α≈tan⁻¹(X1/Y1) is obtained. Numerical Expression 2 is an equation thatconverts the formula α≈tan⁻¹(X1/Y1) into an equation by way of using thecoordinates (X1, Y1) and (X2, Y2) obtained by determining the formulaα≈tan⁻¹(X1/Y1) for the positive and negative angles +Q and −Q.

In the shown embodiment, the reason that pattern matching is dividedinto the positive and negative angle +Q and −Q is that if the angle Q isexcessively large (e.g., if this angle exceeds 5°), then the precisionof pattern matching drops, and erroneous recognition occurs.

Numerical Expression 3 utilizes the fact that the distance between thetip ends of line segments of equal length on either side of the angle Qcan be approximated as r·sin Q in cases where the rotational angle Q isextremely small. In other words, since pattern matching using areference image is executed as geometrically parallel movements, thedistance (O1O2) between the detection point (point of maximumcoincidence) O2 in pattern matching and the point O1 which is theoriginal position of the image center mark is equal to the distance(A1Am1) between the center point Am1 of the image of the pad in thereference image in the pattern-matched attitude and the center point A1of the image of the pad P in the reference image in the originalattitude. Here, from the above-described approximation, (A1Am1)≈r·sin Qis obtained. Accordingly, r·sin Q≈(O1O2); meanwhile,r≈√{(X1)²+(Y1)²}/sin Q is obtained by substituting (O1O2)={(X1)²+(Y1)²}into the right side of this equation, and dividing both sides by sin Q.Numerical Expression 3 is an equation that converts this into anequation using the coordinates (X1, Y1) and (X2, Y2) obtained bydetermining this for the positive and negative angles +Q and −Q.

If α and r obtained by Numerical Expressions 2 and 3 as described aboveare converted into an orthogonal coordinate system, and the coordinatesof the point O are set as (XC1, YC1), then the coordinates of the firstalignment point (AX1, AY1) can be expressed, using the point O as areference, as (AX1, AY1)=(XC1+r·cos α, YC1+r·sin α). This firstalignment point is a rotation-resistant reference point which is suchthat the error between the image of the comparative object obtained byimaging the comparative object disposed in an attitude includingpositional deviation in the rotational direction and the position of theabove-described comparative object detected by pattern matching with thereference image shows a minimum value. In cases where the patternutilized (which is the pad P in this embodiment) is a figure of pointsymmetry such as a square or circle, the center point of this pattern(which is the center point A1 of the pad P in this embodiment) is thefirst alignment point.

The thus calculated coordinates (AX1, AY1) of the first alignment pointA1 are stored in the data memory 36 (S122).

Next, the same processing as in the above steps S102 through S122 isperformed for the second alignment point (S124), and the determinedcoordinates (AX2, AY2) of the second alignment point A2 are stored inthe data memory 36. This second alignment point A2 is not shown in thedrawings.

Next, the coordinates of each bonding point are registered (S126). Morespecifically, for the individual pads P and leads L (other than the padsP selected as the first alignment point A1 and second alignment pointA2), the visual field is moved to an appropriate position, typically apoint that is located at the approximate center of each pad P or lead L,and the coordinates of each bonding point are stored in the data memory36 by, for instance, pressing the input switch of the manual input means33, while aligning the center point 32 a of the cross marks 32 with thisbonding point. Instead of using such a manual input method, it is alsopossible to determine the points located at the approximate centers ofthe respective pads P and leads L by image processing and to store thesecoordinate values in the data memory 36.

The above processing is performed when a new semiconductor device 14 isregistered.

The run time processing is as shown in FIGS. 3 and 10.

First, the new semiconductor device 14 that is the comparative object isset in place. The XY table 1 is operated by the output of the controlsection 34, thus moving the camera 7 so that the center point of thevisual field of the camera 7 coincides with the position (Xp1, Yp1) ofthe imaging point at the time of registration of the first alignmentpoint (S202). Then, from this position, the semiconductor device 14 thatis the comparative object is imaged by the camera 7, so that an image ofthe comparative object is acquired.

Next, a pattern matching processing between the image of the comparativeobject and the registered reference image is executed. In other words, asearch is made for the point of maximum coincidence with the referenceimage in the comparative object utilizing a normalized correlationoperation (S204). This operation is performed using a normalizedcorrelation equation similar to the Numerical Expression 1; andcorrelation values R between the image of the comparative object and thereference image are calculated for the respective pixels within theregion of the image of the comparative object, or for respectivereference points disposed in a scattered manner within the region of theimage of the comparative object; then, a search is made for a pointwhere the correlation value R shows a maximum value.

Next, the reference image is superimposed on the image of thecomparative object at the point of maximum coincidence thus determined,i.e., in the relative position which is such that the amount ofcoincidence between the image of the comparative object and thereference image shows a maximum value (FIG. 10), and the amount ofpositional deviation (X1, Y1) between the coordinates (Xm1, Ym1) of theposition of the center point 32 a of the cross marks 32 in this attitudeand the coordinates (Xp1, Yp1) of the imaging point, which is theposition of the center point of the cross marks 32 at the time of theprevious registration of the reference image, is determined.

Since the pattern matching is executed as geometrically parallelmovements, this amount of positional deviation (X1, Y1) is equal to theamount of positional deviation of the first alignment point A1.Accordingly, the calculated amount of positional deviation (X1, Y1) canbe used as the amount of positional deviation of the first alignmentpoint A1. Therefore, the amount of positional deviation (X1, Y1) isstored in the data memory 36 as the amount of positional deviation ofthe first alignment point A1 in the new semiconductor device 14 withrespect to the first alignment point A1 in the semiconductor device 14at the time of imaging (S206). The coordinates of the position of thefirst alignment point A1 in the new semiconductor device 14 in this caseare (AX1+X1, AY1+Y1).

Next, a processing similar to that performed for the first alignmentpoint A1 in steps S202 through S206 is also performed for the secondalignment point A2, and the amount of positional deviation (X2, Y2) thusobtained is stored in the data memory 36 as the amount of positionaldeviation of the alignment point A2 in the new semiconductor device 14with respect to the alignment point in the semiconductor chip 14 a atthe time of imaging (S212). The coordinates of the position of thesecond alignment point A2 in the new semiconductor device 14 in thiscase are (AX2+X2, AY2+Y2).

Then, based upon the coordinates of the respective bonding pointspreviously registered in step S126, the positions of the respective padsP and leads L are determined by calculation (position correction) fromthe positions of the first alignment point A1 and second alignment pointA2 in the new semiconductor device 14. This is done so that the relativepositions with respect to the first alignment point A1 and secondalignment point A2 are preserved, and the actual bonding points aredetermined.

Then, bonding operations are performed on these actual bonding points(S216). More specifically, the XY table 1 is driven by the output of thecontrol section 34, and the tool 4 is moved to the respective actualbonding points, thus performing the bonding.

As seen from the above, in the first embodiment, pattern matchingbetween the rotated image and reference image is executed (S110), and afirst alignment point A1 and second alignment point A2 constitutingrotation-resistant reference points which are such that the error of theposition of the comparative object detected by pattern matching betweenthe image of a comparative object (that is obtained by imaging thecomparative object disposed in an attitude that includes positionaldeviation in the rotational direction) and the reference image shows aminimum value are specified based upon the results of the patternmatching that is executed in step S110 (S120). Then, the positions ofthe image of the comparative object and the reference image are alignedusing the specified first alignment point A1 and second alignment pointA2 as references (S204, S210), and the position of the comparativeobject is calculated.

Thus, in this embodiment, the first alignment point A1 and secondalignment point A2 used as rotation-resistant reference points aredetermined by executing pattern matching between the rotated image andreference image beforehand. Accordingly, the detection error of theposition of the comparative object can be reduced when the positions ofthe image of the comparative object and the reference image are alignedusing the first alignment point A1 and second alignment point A2 asreferences. As a result, even in cases where the comparative object isdisposed in an attitude that includes positional deviation in therotational direction, high-precision position detection is realizedwithout executing pattern matching in the rotational direction whichtends to require an extremely large amount of calculation.

Furthermore, in the first embodiment, the amounts of positionaldeviation (X1, Y1) and (X2, Y2) between the rotated image and thereference image is calculated by pattern matching of the images (S110,S116), and the first alignment point A1 and second alignment point A2are specified as rotation-resistant reference points based upon therotation angle Q and the amounts of positional deviation (X1, Y1) and(X2, Y2) (S120). In other words, the first alignment point A1 and secondalignment point A2 are specified using the amounts of positionaldeviation (X1, Y1) and (X2, Y2), which are obtained by pattern matchingbetween the rotated image and the reference image, and the rotationangle Q, which is a known quantity.

Furthermore, in the above embodiment, the positions of the respectivebonding points as working processing points in the comparative objectare calculated using the first alignment point A1 and second alignmentpoint A2 as references. Accordingly, since the positions of the firstalignment point A1 and second alignment point A2 are determined with ahigh degree of precision, the detection of the positions of therespective bonding points can also be accomplished with a high degree ofprecision.

Moreover, in the above embodiment, when a new semiconductor device 14 isimaged in the run time processing, the camera 7 is positioned at theimaging points used at the time of registration of the respectivealignment points instead of being positioned at the first alignmentpoint A1 or second alignment point A2 (S202, S208). The reason for thisis as follows: in cases where an alignment point An is located withinthe reticle mark 42 near the periphery of the reticle mark 42 when aregion surrounded by the reticle mark 42 is used as a reference image asshown in FIG. 11, assuming that the center point of the visual field ofthe camera 7 is positioned at the alignment point An in steps S202 andS208, the reference image that can be effectively utilized in this caseis limited to the superimposed portions (i.e., the region indicated byhatching in FIG. 11) of the visual field in this attitude (the regionindicated by a one-dot chain line in FIG. 11) and the reference image,so that the region that can be effectively utilized as a reference imageis reduced in size. However, it is possible to realize a considerabledegree of detection precision excluding this inconvenience; accordingly,a structure in which the center point of the visual field of the camera7 is positioned at the alignment point An in steps S202 and S208 can beused; and such a structure is also in the scope of the presentinvention.

Furthermore, in the above embodiment, the region surrounded by therectangular reticle mark 42 within the reference image is used as atemplate image, and the number of template images within the referenceimage is set at one (1). However, instead of such a structure, it isalso possible to use a structure in which template images are preparedfor a plurality of portions in a single reference image, and a pluralityof template images are used. For example, as seen from FIG. 12, among atotal of four regions partitioned vertically and horizontally by thecross marks 32 and reticle mark 42, the three regions in which markedpads P are contained are respectively designated as small referenceimages r1, r2 and r3. Then, in a suitable operation, the center pointsAr1 through Ar3 are determined as rotation-resistant reference points inthe respective pads P by processing similar to that of steps S108through S120 in the first embodiment; and in the run time processing,the amounts of positional deviation of the center points Ar1 through Ar3in the new semiconductor device 14 are respectively calculated. In sucha case, it is clear that the detection precision is improved compared tothe case in which a single template image is used for a single referenceimage. Such a structure is also in the scope of the present invention.

Furthermore, in the above-described embodiment, the coordinates of thepositions of the alignment points are calculated using NumericalExpressions 2 and 3, which are approximate equations. Instead, it isalso possible that the alignment points are determined by numericalequations other than the equations of Numerical Expressions 2 and 3.Furthermore, it is also possible to use a structure in which a tablethat indicates the relationship of the coordinates (X1, Y1) and (X2, Y2)of the points of maximum coincidence, the rotational angle Q (degrees)and the coordinates of the positions of the alignment points is preparedbeforehand, and the coordinates of the positions of the alignment pointsare read out from this table based upon the input coordinates (X1, Y1)and (X2, Y2) of the points of maximum coincidence and rotational angle Q(degrees).

Second Embodiment

Next, the second embodiment of the present invention will be described.

In this second embodiment, as in the first embodiment, the firstalignment point A1 and second alignment point A2 which arerotation-resistant reference points are specified based upon patternmatching between a rotated image obtained by rotating a reference imageand this reference image. However, the feature of the second embodimentis that the amount of coincidence between the rotated image and thereference image is respectively calculated for a plurality of differentcenters of rotation within the reference image, and centers of rotationthat show a relatively large amount of coincidence among the pluralityof different centers of rotation are specified as rotation-resistantreference points. The mechanical structure in the second embodimentsdescribed below is the same as that in the first embodiment, and adetailed description thereof is omitted.

The operation of the second embodiment will be described with referenceto the flow chart of FIG. 13.

The XY table 1 is driven by the output of the control section 34 so thatthe camera 7 is moved to the vicinity of the point that is to be thefirst alignment point (S302). The position of the center point of thecross marks 32 in the moved attitude is stored in the data memory 36 bythe output of the control section 34 as the coordinates (Xp1, Yp1) ofthe reference imaging point (S304). The semiconductor device 14 isimaged by the camera 7 in this position. The image data converted intoan electrical signal is processed by the image processing section 38 andstored in the data memory 36 as a reference image (S306). The regionsurrounded by the rectangular reticle mark 42 within the reference imageis used as a template image in the position detection process (describedlater). The above processing is the same as the processing in steps S102through S106 of the first embodiment.

Next, in the calculation processing section 37, processing is performedso as to rotate the reference image by +Q° (degrees) (S308). Thisrotation is performed for each of the sampling points constituting theplurality of different centers of rotation within the reference image.For example, the sampling points are set as four rows and six columns ofsampling points Sp11 through Sp46 in FIG. 14.

Next, a pattern matching processing between the rotated image and thereference image is executed. In other words, the correlation value ofthe rotated image, which is obtained as a result of performing rotationprocessing on the first sampling point Sp11, and the reference image, iscalculated using a normalized correlation operation that is the same asthat of the Numerical Expression 1 (S310).

These steps S308 and S310 are repeated until correlation values arecalculated for all of the sampling points Sp11 through Sp46 within thereference image (S312 and S314).

Then, the point showing the maximum calculated correlation value amongall of the sampling points Sp11 through Sp46 is selected as the firstalignment point A1, and the coordinates (AX1, AY1) of this point areregistered (stored) in the data memory 36 (S316).

Here, in the example shown in FIG. 14, of all of the sampling pointsSp11 through Sp46, the sampling point Sp22 shows the largest correlationvalue. Therefore, the sampling point Sp22 is registered as the firstalignment point A1.

Next, a processing similar to that of steps S302 through S316 isperformed for the second alignment point (S318), and the coordinates(AX2, AY2) of the second alignment point thus determined are stored inthe data memory 36. Furthermore, the second alignment point A2 is notshown in the drawings.

Next, the coordinates of the respective bonding points are registered(S320). As in the case of the first embodiment, this registration of thecoordinates of the respective bonding points is accomplished as follows:for example, in the case of the individual pads P and leads L other thanthe pads P selected as the first alignment point A1 and second alignmentpoint A2, the visual field is moved to an appropriate position on thepad or lead, typically a point located at the approximate center of eachpad P or lead L, and the coordinates of each bonding point are stored inthe data memory 36 by, for instance, pressing the input switch of themanual input means 33, while aligning the center point 32 a of the crossmarks 32 with this bonding point. The above processing is performed whena new semiconductor device 14 is registered.

The subsequent run time processing is the same as that in the firstembodiment (FIG. 3).

Thus, in the second embodiment, correlation values representing theamount of coincidence between the rotated image and the reference imageare respectively calculated for each of the sampling points Sp11 throughSp46, which constitute a plurality of different centers of rotationwithin the reference image, and the sampling point Sp22 which shows thelargest correlation value of any of the sampling points Sp11 throughSp46 is specified as the first alignment point A1, which is arotation-resistant reference point. Accordingly, the influence of thepositional deviation of the attitude of the comparative object in therotational direction can be reduced.

Furthermore, in the second embodiment, the sampling point Sp22 whichshows the largest correlation value of any of the sampling points Sp11through Sp46 is selected as the first alignment point A1. However, aconsiderable degree of precision in position detection can also berealized by using a structure in which a point in the vicinity of thesampling point Sp22 is selected as the first alignment point instead ofa structure in which the sampling point Sp22 itself is designates as thefirst alignment point A1. For example, it is possible to use a structurein which a plurality of sampling points with high correlation values(e.g., a specified number of sampling points, or all sampling pointsincluded in a specified range of values) are selected from the top, andthe mean value of the position coordinates of these sampling points aredesignated as the alignment point; or the position coordinates of thepoint at which the correlation value shows a maximum value is estimatedby calculation based upon the position coordinates of the selectedplurality of sampling points, and this point is designated as thealignment point.

Also, in the second embodiment, the detection precision increases as thenumber of sampling points increases. However, as long as there are twoor more sampling points within the reference image, the detectionprecision increases compared to a structure in which the coordinates ofthe position of the center point 32 a of the cross marks 32 within thereference image are unconditionally taken as the alignment point as in aconventional method. For example, as shown in FIG. 15, a structure canbed used in which the region surrounded by the reticle mark 42 that isto form the reference image is divided into two equal parts in both thevertical and horizontal directions, and the center points of a total offour split regions are respectively designated as the sampling pointsSp11 through Sp22. In this case, it is advisable to designate thesampling point that has the largest correlation value of any of thesampling points Sp11 through Sp22 (in the example shown in FIG. 15, thisis the sampling point Sp11) as the alignment point A1. In such astructure, the detection precision deteriorates compared to a case inwhich numerous sampling points are disposed as shown in FIG. 14.However, the detection precision is still higher compared to thestructure in which the coordinates of the position of the center pointof the cross marks 32 within the reference image are unconditionally setas the alignment point as in conventional methods.

It is not essential that the position coordinates of the sampling pointbe designated “as is” as the alignment point. For example, it is alsopossible to use a structure in which: the vertices at the four cornersof the reticle mark 42 in FIG. 15 are used as sampling points whoserespective correlation values are determined, the region surrounded bythe reticle mark 42 is divided into two equal parts in the vertical andhorizontal directions, the center points of a total of four splitregions thus obtained are designated as alignment point candidates, andthe center point of the quarter-region containing the sampling pointwith the largest correlation value is selected as the alignment point.

Third Embodiment

Next, the third embodiment of the present invention will be described.

In this third embodiment, at least two alignment points are specifiedfor a single comparative object; and in the alignment of the positionsof the comparative object and reference image, the above-described twoor more alignment points are contained in a single image frame. Themechanical structure of the third embodiment is the same as that of thefirst embodiment; accordingly, a detailed description thereof isomitted.

In the third embodiment, as seen from FIG. 16, a semiconductor device 14is used which has two reference patterns D and E in a region located onthe inside of the semiconductor chip 14 a with respect to the positionsof the pads P. In this addition, the respective center points Dc and Ecin these reference patterns D and E are respectively used as the firstalignment point A1 and second alignment point A2. Furthermore, therespective center points of the pads P constitute the bonding points. Inother words, the bonding points are present as working processing pointson the outside of a circle, which contacts the center points Dc and Ecof the two reference patterns D and E (i.e., the alignment points A1 andA2) and whose diameter is a straight line connecting both of thesecenter points.

Next, the operation of the third embodiment will be described.

In FIG. 17, the XY table 1 is first driven by the output of the controlsection 34 so that the camera 7 is moved to a position where the pointsthat are to be the first alignment point and second alignment point(i.e., the center points Dc and Ec) are included in the visual field ofthe camera 7. In other words, the camera 7 is moved to a position wherethe reference patterns D and E are surrounded by the reticle mark 42(S402). The position of the center point of the cross marks 32 in themoved attitude is stored in the data memory 36 by the output of thecontrol section 34 as the coordinates (Xp1, Yp1) of the referenceimaging point (S404). In this position, the semiconductor device 14 isimaged by the camera 7; and the image data converted into an electricalsignal is processed by the image processing section 38 and stored in thedata memory 36 as a reference image (S406).

Here, in the reference image thus acquired, the region surrounded by therectangular reticle mark 42 is divided into two equal parts in thevertical and horizontal directions by the cross marks 32. Among thetotal of four split regions, the two marked regions containing thereference patterns D and E are respectively designated as smallreference images Td and Te.

Then, the center points Dc and Ec are determined as rotation-resistantreference points in the respective reference patterns D and E by thesame processing as that performed in steps S108 through S126 in thefirst embodiment (S408 through S426). However, since the image of thereference pattern E containing the center point Ec that is to be thesecond alignment point has already been acquired previously at the timeof imaging in step S406, imaging of the reference pattern E is notperformed again in step S424. In other words, images for both of thereference patterns D and E are obtained by a single imaging of thesemiconductor device 14.

In the run time processing, a processing similar to that of the firstembodiment (FIG. 3) is performed. More specifically, the amounts ofpositional deviation of the center points Dc and Ec in the newsemiconductor device 14 are respectively calculated, the positioncoordinates of the center points of the respective pads P constitutingthe respective bonding points are subjected to position correction, andthen bonding is performed.

As seen from the above, in the third embodiment, the respective centerpoints Dc and Ec of the reference patterns D and E (i.e., the alignmentpoints A1 and A2), which constitute two rotation-resistant referencepoints, are specified for a semiconductor device 14 which constitutes asingle comparative object. In addition, in the alignment of thepositions of the comparative object and the reference image, therespective center points Dc and Ec of the reference patterns D and E areincluded within the region surrounded by the reticle mark 42 in thevisual field of the camera 7, which is a single image frame.Accordingly, there is no need to perform image acquisition separatelyfor the respective reference patterns D and E, and an image acquisitionat the time of position alignment needs to be performed only once(S406). Thus, the working efficiency of the position detection processcan be improved.

Furthermore, in the third embodiment, the respective center points Dcand Ec of the reference patterns D and E (i.e., the alignment points A1and A2), which constitute two rotation-resistance reference points, arespecified for the semiconductor device 14, which is a single comparativeobject. Moreover, bonding points that are present on the outside of acircle (indicated by a one-dot chain line in FIG. 16), which contactsthe respective center points Dc and Ec of these reference patterns D andE and whose diameter is a straight line connecting both of these centerpoints, are calculated. Accordingly, the distance of the relativemovement of the camera 7 and the semiconductor device 14 during theimaging of the reference patterns D and E can be reduced compared to themovement in the structure in which bonding points that are presentinside a region surrounded by the two alignment points are calculated asin conventional methods. In particular, in the third embodiment, sincethe reference patterns D and E are contained within the reticle mark 42in the visual field of the camera 7 which is a single image frame, thedistance of the relative movement of the camera 7 and the semiconductordevice 14 during the imaging of the reference patterns D and E can bereduced to zero. Accordingly, the working efficiency of the positiondetection process is improved, and this embodiment is especiallysuitable for bonding performed on large semiconductor devices.

In embodiments described above, correlation values are used asindicators for evaluating the amount of coincidence between thereference image and the rotated image or the amount of coincidencebetween the reference image and the input image. However, such astructure is merely an example. The amount of coincidence in the presentinvention can also be evaluated using various other universally knownmethods for evaluating coincidence. For instance, a method that usesresidual differences can be employed. Furthermore, in cases where theamount of coincidence between binary images is evaluated, a count valueobtained by a method in which pixels whose values agree are counted asone (1) and pixels whose values do not agree are counted as zero, can beused as the amount of coincidence.

Furthermore, in the above embodiments, alignment points are calculatedutilizing the pads P and reference patterns D and E. However, it is notessential that the alignment points be determined utilizing such pads Por reference patterns D and E. As long as the patterns used have adetectable unique shape that appears in the semiconductor device 14,then, other patterns, especially the shapes of portions of thesemiconductor chip 14 a, unique sequences of a plurality of patterns, orcombinations of such, can be utilized.

In addition, in the respective embodiments described above, descriptionsare made with reference to the process in which mainly bonding points onthe pads P are calculated. However, it goes without saying that such aprocess can be performed in the calculation of bonding points on theleads L or other members.

Furthermore, in the shown embodiments, the invention is described withreference to a wire bonding apparatus. However, the present invention iswidely used for position detection in other types of semiconductormanufacturing apparatuses and apparatuses of other types that usespattern matching. Such structures are also in the scope of the presentinvention.

1. An image processing method comprising the steps of: executing patternmatching between a rotated image and a reference image, said rotatedimage being obtained by rotating said reference image that is inputtedbeforehand, specifying, based upon a result of said pattern matching, arotation-resistant reference point at which an error of position of acomparative object becomes a minimum value, said error being detected bypattern matching between an image of said comparative object, which isobtained by imaging said comparative object disposed in an attitude thatincludes a positional deviation in a direction of rotation, and saidreference image, and performing a positional alignment of said image ofsaid comparative object and said reference image using saidrotation-resistant reference point as a reference, thus calculating aposition of said comparative object.
 2. An image processing methodcomprising the steps of calculating an amount of positional deviationbetween a rotated image and a reference image based upon patternmatching between said rotated image and said reference image, saidrotated image being obtained by rotating said reference image that isinputted beforehand, specifying, based upon an angle of said rotationand said amount of positional deviation, a rotation-resistant referencepoint at which an error of position of a comparative object becomes aminimum value, said error being detected by pattern matching between animage of said comparative object, which is obtained by imaging saidcomparative object disposed in an attitude that includes a positionaldeviation in a direction of rotation, and said reference image, andperforming a positional alignment of said image of said comparativeobject and said reference image using said rotation-resistant referencepoint as a reference, thus calculating a position of said comparativeobject.
 3. An image processing method comprising the steps of:performing calculations of amount of coincidence between a rotated imageand a reference image for each of a plurality of different centers ofrotation within said reference image, said rotated image being obtainedby rotating said reference image that is inputted beforehand, specifyinga center of rotation or a point in a region near said center of rotationas a rotation-resistant reference point, said center of rotation beingwithin a specified range from a maximum value of said amount ofcoincidence among said plurality of different centers of rotation, andsaid rotation-resistant reference point being at which an error ofposition of a comparative object becomes a minimum value, said errorbeing detected by pattern matching between an image of said comparativeobject, which is obtained by imaging said comparative object disposed inan attitude that includes a positional deviation in a direction ofrotation, and said reference image, and performing a positionalalignment of said image of said comparative object and said referenceimage using said rotation-resistant reference point as a reference, thuscalculating a position of said comparative object.
 4. The imageprocessing method according to claim 1, 2 or 3, wherein: at least two ofsaid rotation-resistant reference points are specified for a singlecomparative object, and said at least two of rotation-resistantreference points are included in a single image frame upon performingsaid positional alignment.
 5. The image processing method according toclaim 1, 2 or 3, said method further comprising the step of calculatingworking processing points in said comparative object using saidrotation-resistant reference points as a reference.
 6. The imageprocessing method according to claim 4, said method further comprisingthe step of calculating working processing points in said comparativeobject using said rotation-resistant reference points as a reference. 7.The image processing method according to claim 5, wherein: two of saidrotation-resistant reference points are specified for a singlecomparative object, and working processing points that are presentoutside a circle, which contacts said two rotation-resistant referencepoints and whose diameter is a straight line that connects said tworotation-resistant reference points, are calculated.
 8. The imageprocessing method according to claim 6, wherein: two of saidrotation-resistant reference points are specified for a singlecomparative object, and working processing points that are presentoutside a circle, which contacts said two rotation-resistant referencepoints and whose diameter is a straight line that connects said tworotation-resistant reference points, are calculated.
 9. An imageprocessing device comprising: a trial processing means that executespattern matching between a rotated image and a reference image, saidrotated image being obtained by rotating said reference image that isinputted beforehand, a reference point calculating means that specifies,based upon a result of said pattern matching, a rotation-resistantreference point at which an error of position of a comparative objectbecomes a minimum value, said error being detected by pattern matchingbetween an image of said comparative object, which is obtained byimaging said comparative object disposed in an attitude that includes apositional deviation in a direction of rotation, and said referenceimage, and a position detection means that performs a positionalalignment of said image of said comparative object and said referenceimage using said rotation-resistant reference point as a reference, thuscalculating a position of said comparative object.